 <?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserInfoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
        //创建用户基本信息表
        Schema::create('user_info', function(Blueprint $table)
        {
            $table->increments('id');                                    //编号
            $table->unsignedInteger('user_id')->nullable();              //用户ID
            $table->string('realname');                                  //用户名字
            $table->string('province')->nullable();                      //省份
            $table->string('city')->nullable();                          //城市
            $table->string('town')->nullable();                          //区 县
            $table->string('wechat')->nullable();                        //微信
            $table->string('weibo')->nullable();                         //微博
            $table->string('maimai')->nullable();                        //脉脉
            $table->unsignedInteger('photo_id')->nullable();             //头像保存id
            $table->unsignedInteger('img_cardfront_id')->nullable();     //身份证图片正面id
            $table->unsignedInteger('img_cardback_id')->nullable();      //身份证反面图片id
            $table->unsignedInteger('img_callcard_id')->nullable();      //名片图片id
            $table->string('edu_school')->nullable();                    //毕业学校
            $table->string('position')->nullable();                      //职位
            $table->text('user_desc')->nullable();                       //个人介绍
            $table->integer('role')->nullable();                         //用户角色
            $table->softDeletes();
            $table->timestamps();
        });
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('user_info');
	}

}
